package com.qingpeng.pay.adapter;

import android.view.View;
import android.widget.LinearLayout;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.qingpeng.pay.R;
import com.qingpeng.pay.beans.QRCodeMoneyListBean;

public class QRCodeMoneyListAdapter extends BaseQuickAdapter<QRCodeMoneyListBean.DataProductBean, BaseViewHolder> {

    public QRCodeMoneyListAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, QRCodeMoneyListBean.DataProductBean item) {
        LinearLayout view = (LinearLayout) helper.getView(R.id.ll_money);
        if (item.getIs_show().equals("1")) {
            helper.setText(R.id.text_money, "￥" + item.getMoney());
        }else{
            view.setVisibility(View.GONE);
        }
    }
}
